package com.example.workshop.lesson9;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Movie {
    private static int instances=0;
    private  int id;
    private String name;
    private String genre;
    private String producer;

    public Movie() {
       super();
       instances++;
        System.out.println("Movice constructor called");
    }

    public static int getInstances() {
        return Movie.instances;
    }
    public double movieSimlarity(int movie1,int movie2){
        double simlarity=0.0;


        //genre相同，相似度加0.3
        //producer相同，相似度加0.5

        return simlarity;
    }
}
